package com.example.service;

import com.github.pagehelper.PageInfo;
import com.example.entity.Employee;

import java.util.List;

/**
 * @Description TODO
 * @Author dingchunlin
 * @Date 2023/12/27 20:34
 * @Version 1.0.0
 */
public interface EmployeeService {

    /**
     * 进行员工的登录
     * @param employee
     * @return
     */
    Employee login(Employee employee);

    /**
     * 根据id查询员工信息
     * @param id
     * @return
     */
    Employee selectById(Integer id);

    List<Integer> selectIdByDepartmentId(Integer id);

    /**
     * 根据部门id和角色查询员工信息
     * @param departmentId
     * @param role
     * @return
     */
    Employee selectByDepartmentIdAndRole(Integer departmentId, String role);

    /**
     * 添加员工信息
     * @param employee
     */
    void add(Employee employee);

    /**
     * 根据id删除员工信息
     * @param id
     */
    void deleteById(Integer id);

    /**
     * 批量删除员工信息
     * @param ids
     */
    void deleteBatch(List<Integer> ids);

    /**
     * 修改用户的信息
     * @param employee
     */
    void updateEmployee(Employee employee);

    /**
     * 查询全部的用户信息
     * @param employee
     * @return
     */
    List<Employee> selectAll(Employee employee);

    /**
     * 分页查询员工信息
     * @param employee
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo<Employee> selectPage(Employee employee, Integer pageNum, Integer pageSize);

    /**
     * 注册
     */
    void register(Employee employee);

    /**
     * 修改用户的密码
     * @param employee
     */
    void updatePassword(Employee employee);

    Employee selectByName(String name);
}
